worker.terminate() from the main thread kills the worker immediately; self.close() from inside the worker terminates itself. Both stop the worker instantly without waiting for pending operations.
worker.terminate() is externally initiated; self.close() is self-initiated. No cleanup hooks; any ongoing operations are aborted. To gracefully stop, use a message to request shutdown and allow cleanup in worker.